package com.wen.service.impl;

import com.github.pagehelper.PageHelper;
import com.wen.dao.SysLogMapper;
import com.wen.pojo.SysLog;
import com.wen.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 20212
 */
@Service
public class SysLogServiceImpl implements SysLogService {
    @Autowired
    private SysLogMapper sysLogMapper;

    @Override
    public void add(SysLog sysLog) throws Exception {
        sysLogMapper.add(sysLog);
    }

    @Override
    public List<SysLog> findAll(int page, int size) throws Exception {
        PageHelper.startPage(page, size);
        return sysLogMapper.findAll();
    }
}
